package com.example.demo;

import org.springframework.boot.SpringApplicationRunListener;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

public class HelloSpringApplicationRunListener  implements SpringApplicationRunListener {
    @Override
    public void starting() {
        System.out.println("-------------------------1---------------");
    }

    @Override
    public void environmentPrepared(ConfigurableEnvironment environment) {
        System.out.println("-------------------------2---------------");
    }

    @Override
    public void contextPrepared(ConfigurableApplicationContext context) {
        System.out.println("-------------------------3---------------");
    }

    @Override
    public void contextLoaded(ConfigurableApplicationContext context) {
        System.out.println("-------------------------4---------------");
    }

    @Override
    public void started(ConfigurableApplicationContext context) {
        System.out.println("-------------------------5---------------");
    }

    @Override
    public void running(ConfigurableApplicationContext context) {
        System.out.println("-------------------------6---------------");
    }

    @Override
    public void failed(ConfigurableApplicationContext context, Throwable exception) {
        System.out.println("-------------------------7---------------");
    }
}
